package top.glike.ssl.auto.utils;

import lombok.Data;

/**
 * packageName top.glike.ssl.auto.utils
 *
 * @author Sophia
 * @className FileUploadResult
 * @description TODO
 * @date 2025/10/13
 */
@Data
public class FileUploadResult {
    private boolean success;
    private String message;
    private String remotePath;
    private long fileSize;
    private long uploadTime;

    public static FileUploadResult success(String remotePath, long fileSize, long uploadTime) {
        FileUploadResult result = new FileUploadResult();
        result.setSuccess(true);
        result.setMessage("File uploaded successfully");
        result.setRemotePath(remotePath);
        result.setFileSize(fileSize);
        result.setUploadTime(uploadTime);
        return result;
    }

    public static FileUploadResult failure(String message) {
        FileUploadResult result = new FileUploadResult();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }
}
